home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / testRedef.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-23  |  1.3 KB  |  40 lines

  1. /*
  2.  * testRedef.h --
  3.  *
  4.  *    Redefinitions of "test" routines for use with /dev/console.
  5.  *
  6.  * Copyright 1992 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that this copyright
  10.  * notice appears in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /user5/kupfer/spriteserver/include/user/RCS/testRedef.h,v 1.1 92/03/23 14:20:34 kupfer Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _TESTREDEF
  19. #define _TESTREDEF
  20.  
  21. /* 
  22.  * This might cause some problems if this header file is included in the 
  23.  * middle of a function, but only if stdio.h wasn't already included.
  24.  */
  25. #include <stdio.h>
  26.  
  27. /* 
  28.  * There isn't a trivial equivalent for Test_PutTime.  It was a 
  29.  * special-purpose hack, anyway, so don't bother fixing it here.
  30.  */
  31.  
  32. #define Test_PutDecimal(val)    printf("%d", (val))
  33. #define Test_PutHex(val)    printf("0x%x", (val))
  34. #define Test_PutOctal(val)    printf("0%o", (val))
  35. #define Test_PutMessage(str)    printf("%s", (str))
  36. #define Test_PutString(str)    printf("%s", (str))
  37. #define Test_GetString(buf, bufLen)    fgets((buf), (bufLen), stdin)
  38.  
  39. #endif /* _TESTREDEF */
  40.